package com.cloudwise.gproject.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;

/**
 * (Log)实体类
 *
 * @author makejava
 * @since 2021-03-22 13:28:06
 */
@Data
public class Log implements Serializable {
    private static final long serialVersionUID = 615501883996464305L;
    /**
     * 自增主键
     */
    private Integer id;
    /**
     * 登录名
     */
    private String loginName;
    /**
     * 用户名
     */
    private String userName;
    /**
     * IP地址
     */
    private String ip;
    /**
     * 类名
     */
    private String className;
    /**
     * 方法名
     */
    private String methodName;
    /**
     * 参数
     */
    private String params;
    /**
     * 创建时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private String createTime;

    public Log(String loginName, String userName, String ip, String className, String methodName, String params) {
        this.loginName = loginName;
        this.userName = userName;
        this.ip = ip;
        this.className = className;
        this.methodName = methodName;
        this.params = params;
    }

    public Log() {
    }
}
